<?php if ($type=='index'&&$page=='1') { ?>
<title><?php  echo $name;  ?>-<?php  echo $title;  ?></title>
<?php }else{  ?>
<title><?php  echo $title;  ?>-<?php  echo $name;  ?></title>
<?php } ?>
<?php 
        if($type=='index'){
                $keywords = $zbp->Config('Tctitleseo')->title_keywords;
                $description = $zbp->Config('Tctitleseo')->title_description;
        }elseif($type=='category'){
                $keywords = $category->Name;
                $description = $category->Intro;
        }elseif($type=='article'||$type=='page'){
                $aryTags = array();
                foreach($article->Tags as $key){
                        $aryTags[] = $key->Name;
                }
                if(count($aryTags)>0) $keywords = implode(',',$aryTags);
                $description = preg_replace('/[\r\n\s]+/', '', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),100)).'...');
        }
 ?>
<?php if (isset($keywords)&&strlen($keywords)>0) { ?>
<meta name="keywords" content="<?php  echo $keywords;  ?>" />
<?php } ?>
<?php if (isset($description)&&strlen($description)>0) { ?>
<meta name="description" content="<?php  echo $description;  ?>" />
<?php } ?>